package com.ghpt.service.impl;
import com.ghpt.mapper.DianChiMapper;
import com.ghpt.pojo.DianChi;
import com.ghpt.service.DianChiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DianChiServiceImpl implements DianChiService {
    @Autowired
    private DianChiMapper dianChiMapper;

    @Override
    public DianChi findDianChiById(Long id) {
        if (id != null) {
            return dianChiMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(DianChi dianChi) {
        return dianChiMapper.updateById(dianChi);//更新成功为1否则为0
    }
}
